#set(seoTitle="个人安全设置")
#@layout()
#define main()
#define css()
<link rel="stylesheet" type="text/css" href="/static/css/hi-user-setting.css">
#end
<!-- 内容区域 -->
<div class="aw-container-wrap">
	<div class="container">
		<div class="row">
			<div class="aw-content-wrap clearfix">
				<div class="aw-user-setting">
					<div class="tabbable">
						<ul class="nav nav-tabs aw-nav-tabs active">
							<li>
								<a href="/my/setting/verify/">申请认证</a>
							</li>
							<li class="active">
								<a href="/my/setting/security">安全设置</a>
							</li>
							<li>
								<a href="/my/setting/avatar/">头像修改</a>
							</li>
							<li>
								<a href="/my/setting">基本资料</a>
							</li>
							<h2>
								<i class="icon icon-setting"></i>用户设置
							</h2>
						</ul>
					</div>
					<div class="tab-content clearfix">
						<div class="aw-mod">
							<div class="mod-body">
								<div class="aw-mod aw-user-setting-bind">
									<div class="mod-head">
										<h3>修改密码</h3>
									</div>
									<form id="password_update_form" class="form-horizontal" action="/my/setting/securitySetting" method="post">
										<div class="mod-body">
											<div class="form-group">
												<label class="control-label" >当前密码</label>
												<div class="row">
													<div class="col-lg-4">
														<input type="password" class="form-control" id="oldPassword" name="oldPassword">
													</div>
												</div>
											</div>
											<div class="form-group">
												<label class="control-label" >新的密码</label>
												<div class="row">
													<div class="col-lg-4">
														<input type="password" class="form-control" id="newPassword" name="newPassword">
													</div>
												</div>
											</div>
											<div class="form-group">
												<label class="control-label">确认密码</label>
												<div class="row">
													<div class="col-lg-4">
														<input type="password" class="form-control" id="newPassword_que" name="newPassword_que">
													</div>
												</div>
											</div>
										</div>
										<div class="mod-footer clearfix">
											<input id="password_update_btn" type="submit" class="btn btn-large btn-success pull-right" value="提交"/>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 内容区域end -->
#end

#define js()
<script type="text/javascript" src="/static/lib/jquery_form/jquery.form.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#password_update_form").ajaxForm({
			dataType: "json"
			, beforeSubmit: function(formData, jqForm, options) {
			}
			, success: function(ret) {
				if (ret.state == "ok") {
					showOkMessage(ret.msg);
				} else {
					showErrorMsg(ret.msg);
				}
			}
			, error: function(ret) {
				alert(ret.msg);
			}
		});
	});

	function showOkMessage(msg) {
		layer.msg(msg, {
					shift: 0
					, shade: 0.4
					, time: 0
					, offset: "140px"
					, closeBtn: 1
					, shadeClose: false
					,maxWidth: "1000"
				}, function () {
					location.href = "/logout";
				}
		);
	}
</script>
#end